package com.example.demo11.service;

import com.example.demo11.entity.Role;

import java.util.List;
import java.util.Map;

public interface RoleService {
    //根据名字查找
    List<Map<String, Object>> findByName(String name);

    //根据id查找
    Role findById(Integer id);

    List<Map<String, Object>> findRoleByUserName(String name);

    List<Map<String, Object>> findUserByRoleName(String name);

    //根据id删除
    int deleteId(Integer id);

    int addUser(Role user);

    int updateUser(Role user);

    List<Map<String, Object>> findRoleByUserId(Integer id);

    List<Map<String, Object>> findUserByRoleId(Integer id);
    //查询所有
    List<Map<String, Object>> findAll(Integer page);
}